﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;

namespace WinnerCMS.Licenses
{
    /// <summary>
    /// 许可
    /// </summary>
    public class License
    {
        /// <summary>
        /// 当前版本
        /// </summary>
        static public Edition CurrentEdition
        {
            get
            {
                return Edition.企业版;
                //if (SN == "0C72A3-3C26A-F5BD7-20BF6-27E75-07583D465")
                //{
                //    return Edition.免费版;
                //}
                //return Edition.免费版;
            }
        }

        static public void LicenseInfo()
        {

        } 
      

        #region 序列号

        /// <summary>
        /// 序列号
        /// </summary>
        static public string SN
        {
            get
            {
                //string str = Hash.Md5hash_String(ShiBieMa());
                //str = Hash.Md5hash_String(str, "SHA1");

                //for (int i = 1; i < 6; i++)
                //{
                //    str = str.Remove(i * 5, 1);
                //    str = str.Insert(i * 6, "-");
                //}
                //return str;

                return "0C72A3-3C26A-F5BD7-20BF6-27E75-07583D465";

            }
        }
        ///// <summary>
        ///// 得到识别码！
        ///// </summary>
        ///// <returns></returns>
        //static private string ShiBieMa()
        //{
        //    string str = "";
        //    try
        //    {
        //        str = Key.HDVal();//硬盘C盘序列号
        //    }
        //    catch
        //    {
        //        str = "JW*#I@(";
        //    }

        //    return Hash.Md5hash_String(str, "SHA1");
        //}
 
        #endregion
    }
}